﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Evpo.ContactData.Common;
using Evpo.ContactData.UI.GeneralClasses;

namespace Evpo.ContactData.UI
{
    public partial class AddressInList : ItemInList
    {
        #region Handlers
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        #endregion Handlers

        #region Properties
        protected override HiddenField IDControl
        {
            get { return uiID; }
        }

        protected override CheckBox SelectionControl
        {
            get { return uiSelect; }
        }

        public IAddress Address
        {
            get;
            set;
        }

        public string AddressLines
        {
            get
            {
                string retVal = Address.Line1;
                if (!String.IsNullOrEmpty(Address.Line2))
                {
                    retVal += " " + Address.Line2;
                }
                return retVal;
            }
        }
        #endregion Properties
    }
}